import logging

import yagmail

from datetime import datetime

datatime=datetime.now().strftime('%Y%m%d %H%M%S')



def sed_log(time):
    logging.basicConfig(filename=f"{time}.log",filemode='a+',level=logging.DEBUG,format='%(levelname)s -> %(asctime)s ->%(message)s')



def sed(filep):
    sed=yagmail.SMTP(user='1006142636@qq.com',password='hygnwdryluhsbgac',host='smtp.qq.com')
    sed.send(to='1006142636@qq.com',subject='报告',contents='今日报告,请查看',attachments=filep)

